// pages/abnormal/abnoraml.js
var app = getApp();
Component({
  /**
   * 组件的属性列表
   */
  properties: {

  },

  /**
   * 组件的初始数据
   */
  data: {
    abnormal: {}
  },

  /**
   * 组件的方法列表
   */
  methods: {
    //读取数据
    setListData: function () {
      let that = this;
      var abnormal = app.globalData.abnormal
      // for (let i = 0, len = reportArr.length; i < len; i++) {
      //   for (let j = 0, leng = reportArr[i].project.length; j < leng; j++) {
      //     reportArr[i].project[j].open = false
      //     that.calculationLeft(reportArr, reportArr[i].project[j])
      //   }
      // }
      // console.log(reportArr)
      that.setData({
        abnormal: abnormal
      });
      app.globalData.abnormal = [];
    },
    drugsDetailClick: function (e) {
      console.log(e)
      var myEventDetail = {
        index: e.currentTarget.dataset.index
      } // detail对象，提供给事件监听函数
      this.triggerEvent('drugsDetail', myEventDetail)
    }
  },
  ready: function () {
    this.setListData();
  }
})
